<!--
Date: 2025-08-13
Copyright (c) 2025 CAX Conversion Project
-->
<template>
  <el-dialog v-model="dialogVisible" title="参数设置" width="800" :before-close="closeDialog">
    <el-form :model="parameterSettingFormData" label-position="top">
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="节点结果">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox1">
              <el-checkbox label="位移" value="A" />
              <el-checkbox label="速度" value="B" />
              <el-checkbox label="加速度" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="几何模型信息">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox2">
              <el-checkbox label="节点" value="A" />
              <el-checkbox label="元素定义" value="B" />
              <el-checkbox label="连接关系" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="材料属性">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox3">
              <el-checkbox label="物理性质" value="A" />
              <el-checkbox label="机械性能" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="边界条件与载荷">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox4">
              <el-checkbox label="初始条件" value="A" />
              <el-checkbox label="约束条件" value="B" />
              <el-checkbox label="外载荷" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="求解过程信息">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox5">
              <el-checkbox label="求解器设置" value="A" />
              <el-checkbox label="时间步长" value="B" />
              <el-checkbox label="收敛准则" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="元素结果">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox6">
              <el-checkbox label="应力" value="A" />
              <el-checkbox label="应变力" value="B" />
              <el-checkbox label="热流" value="C" />
              <el-checkbox label="温度" value="D" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="质量特性">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox7">
              <el-checkbox label="质量" value="A" />
              <el-checkbox label="质性" value="B" />
              <el-checkbox label="转动惯量" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="频率响应与模态分析结果">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox8">
              <el-checkbox label="自然频率" value="A" />
              <el-checkbox label="模态振型" value="B" />
              <el-checkbox label="参与因子" value="C" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="11" class="b-1 b-#cccccc b-solid mr2 pt2 mb2">
          <el-form-item label="谱分析结果">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox9">
              <el-checkbox label="随机振动结果" value="A" />
              <el-checkbox label="频域分析结果" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
        <el-col :span="11" class="b-1 b-#cccccc b-solid ml2 pt2 mb2">
          <el-form-item label="碰撞与接触结果">
            <el-checkbox-group v-model="parameterSettingFormData.checkbox10">
              <el-checkbox label="碰撞效应结果" value="A" />
              <el-checkbox label="接触效应结果" value="B" />
            </el-checkbox-group>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <template #footer>
      <div class="dialog-footer text-center">
        <el-button @click="closeDialog">取消</el-button>
        <el-button type="primary" @click="closeDialog">保存</el-button>
      </div>
    </template>
  </el-dialog>
</template>

<script setup name="ParameterSettingDialog" lang="ts">
const dialogVisible = ref(false);
const parameterSettingFormData = ref({
  checkbox1: ['A', 'B', 'C'],
  checkbox2: ['A', 'B', 'C'],
  checkbox3: ['A', 'B'],
  checkbox4: ['A', 'B', 'C'],
  checkbox5: ['A', 'B', 'C'],
  checkbox6: ['A', 'B', 'C', 'D'],
  checkbox7: ['A', 'B', 'C'],
  checkbox8: ['A', 'B', 'C'],
  checkbox9: ['A', 'B'],
  checkbox10: ['A', 'B']
});
const openDialog = () => {
  dialogVisible.value = true;
};
const closeDialog = () => {
  dialogVisible.value = false;
};
defineExpose({
  openDialog,
  closeDialog
});
</script>
<style lang="scss" scoped>
:deep(.el-form-item__label) {
  color: #409eff;
}
:deep(.el-form-item__label)::before {
  content: '';
  display: inline-block;
  width: 2px;
  height: 15px;
  margin-right: 6px;
  background-color: #409eff;
}
</style>
